For photonic devices utilizing multiple materials/layers, such as germanium-on-silicon (Ge-on-Si) photodiode or gallium arsenide on silicon (GaAs-on-Si) photodiode, these upper layers' (Ge, GaAs, etc.) lattice constants are largely different from that of the substrate layer (Si). As a result, various defects and dislocations (such as threading and misfit dislocations) can be observed inside these upper layers, which may include defect energy states in these upper layers, especially in the interface region between different materials/layers. Moreover, these defects in upper layers can behave as acceptor-like dopants and have an effective carrier concentration. For example, the carrier concentration (caused by defects) around the interface region of Ge-on-Si is typically in the range of 1015˜1018 cm−3. Because of the existence of defect-induced carrier concentration, the affected region is more difficult to be depleted (compared to intrinsic material) and it requires a higher bias voltage to be applied for photodiode or avalanche photodiode operation. For high speed devices capable of operating at a speed of 25 GHz or beyond, such higher applied bias is undesirable and unacceptable. Moreover, a high applied bias tends to cause high electric field, which may likely lead to high leakage current.